# Maintainer: David Sugar <tychosoft@gmail.com>
# Contributor: David Sugar <tychosoft@gmail.com>
pkgname=moderncli
pkgver=0.9.4
pkgrel=0
pkgdesc="Modern C++17 header-only library of includes"
url="https://gitlab.com/tychosoft/moderncli"
arch="noarch"
license="MIT"
makedepends="cmake fmt-dev openssl-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://gitlab.com/tychosoft/moderncli/-/archive/v$pkgver/moderncli-v$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-v$pkgver

build() {
	cmake \
		-DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release .
	make
}

check() {
	make test
}

package() {
	DESTDIR="$pkgdir" make install
	install -Dm644 LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
	install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
	install -Dm644 FEATURES.md "$pkgdir"/usr/share/doc/$pkgname/FEATURES.md
}

sha512sums="
1182249cbaf7f7bf8b7d6e268a5ba1a5cd13159c3a36240d71cd3fdc6ce204b36484da480e9f3049a177b9725b10574f8278b8da0f3ead3d081e588a2a6c0c2b  moderncli-v0.9.4.tar.gz
"
